
	
/*
 * 自动计算表单数据
 */
function calFormItem() {
	
    var domForm = $('#' + window.formObj.c.id_form);
	var reconciliationDayBegin = domForm.find('input[name="reconciliationDayBegin"]').val();
	var reconciliationDayEnd = domForm.find('input[name="reconciliationDayEnd"]').val();
	var bid = domForm.find('input[name="bid"]').val();
	if(reconciliationDayBegin && reconciliationDayEnd) {
		var indexOfLoading = layer.load(1, {shade: [0.5,'#000000']});
		$.ajax({
			url: '/api/inter/tcwWanliReconciliation/getAmounts',
			data: {
				bid: bid,
				reconciliationDayBegin: reconciliationDayBegin,
				reconciliationDayEnd: reconciliationDayEnd
			},
			type: 'POST',
			success: function(res) {
				layer.close(indexOfLoading);
				domForm.find('input[name="amountGbp"]').val(res.data.amountGbp);
				domForm.find('input[name="amountUsd"]').val(res.data.amountUsd);
				domForm.find('input[name="amountEur"]').val(res.data.amountEur);
				domForm.find('input[name="feeGbp"]').val(res.data.feeGbp);
				domForm.find('input[name="feeUsd"]').val(res.data.feeUsd);
				domForm.find('input[name="feeEur"]').val(res.data.feeEur);;
				domForm.find('input[name="amountCny"]').val(res.data.amountCny);
			}, error: function() {
			}
		});
	}
}